#!/bin/sh

### Custom user script
### Called after internal WAN up/down action
### $1 - WAN action (up/down)
### $2 - WAN interface name (e.g. eth3 or ppp0)
### $3 - WAN IPv4 address
logger  "运行后 WAN 状态:" "WAN 状态:【$1】, WAN 接口:【$2】, WAN IP:【$3】"

if [ $1 == "up" ] ; then
 curl -k -s -o /tmp/oray.log "http://yzqiang:yzqyzq1234@ddns.oray.com/ph/update?hostname=smccb.51vip.biz,yzqiang.iask.in" &
 curl -k -s -o /tmp/3322.log "http://yzqiang6:yzqyzq1234@members.3322.net/dyndns/update?hostname=yzqiang6.f3322.net" &
    sleep 30
    /etc/storage/crontabs_script.sh up &
    sleep 60
  curl -k -s -o /tmp/freenom.sh https://gitee.com/yzqiang/autoss/raw/master/freenom.sh &&dos2unix /tmp/freenom.sh && sh /tmp/freenom.sh &
fi

